home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / serien / purity / nr.38 / pcq-include / displayinfo.i next >
Text File  |  1980-01-09  |  7KB  |  178 lines

  1.   {   include define file for displayinfo database }
  2.  
  3. {$I   "Include:Exec/Types.i"}
  4. {$I   "Include:Graphics/Gfx.i"}
  5. {$I   "Include:Graphics/Monitor.i"}
  6. {$I   "Include:Utility/TagItem.i"}
  7. {$I   "Include:Graphics/View.i"}
  8. {$I   "Include:Graphics/ModeID.i"}
  9.  
  10. { the "public" handle to a DisplayInfoRecord }
  11. Type
  12.  DisplayInfoHandle = APTR;
  13.  
  14. { datachunk type identifiers }
  15.  
  16. CONST
  17.  DTAG_DISP            =   $80000000;
  18.  DTAG_DIMS            =   $80001000;
  19.  DTAG_MNTR            =   $80002000;
  20.  DTAG_NAME            =   $80003000;
  21.  DTAG_VEC             =   $80004000;      { internal use only }
  22.  
  23. Type
  24.   QueryHeader = Record
  25.    tructID,                    { datachunk type identifier }
  26.    DisplayID,                  { copy of display record key   }
  27.    SkipID,                     { TAG_SKIP -- see tagitems.h }
  28.    Length  :  Integer;         { length of local data in double-longwords }
  29.   END;
  30.   QueryHeaderPtr = ^QueryHeader;
  31.  
  32.   DisplayInfo = Record
  33.    Header : QueryHeader;
  34.    NotAvailable : Short;   { IF NULL available, else see defines }
  35.    PropertyFlags : Integer;  { Properties of this mode see defines }
  36.    Resolution : Point;     { ticks-per-pixel X/Y                 }
  37.    PixelSpeed : Short;     { aproximation in nanoseconds         }
  38.    NumStdSprites : Short;  { number of standard amiga sprites    }
  39.    PaletteRange : Short;   { distinguishable shades available    }
  40.    SpriteResolution : Point; { std sprite ticks-per-pixel X/Y    }
  41.    pad : Array[0..3] of Byte;
  42.    reserved : Array[0..1] of Integer;    { terminator }
  43.   END;
  44.   DisplayInfoPtr = ^DisplayInfo;
  45.  
  46. { availability }
  47.  
  48. CONST
  49.  DI_AVAIL_NOCHIPS        =$0001;
  50.  DI_AVAIL_NOMONITOR      =$0002;
  51.  DI_AVAIL_NOTWITHGENLOCK =$0004;
  52.  
  53. { mode properties }
  54.  
  55.  DIPF_IS_LACE          =  $00000001;
  56.  DIPF_IS_DUALPF        =  $00000002;
  57.  DIPF_IS_PF2PRI        =  $00000004;
  58.  DIPF_IS_HAM           =  $00000008;
  59.  
  60.  DIPF_IS_ECS           =  $00000010;      {      note: ECS modes (SHIRES, VGA, AND **
  61.                                                  PRODUCTIVITY) do not support      **
  62.                                                  attached sprites.                 **
  63.                                                                                         }
  64.  DIPF_IS_AA            =  $00010000;      { AA modes - may only be available
  65.                                                 ** if machine has correct memory
  66.                                                 ** type to support required
  67.                                                 ** bandwidth - check availability.
  68.                                                 ** (V39)
  69.                                                 }
  70.  DIPF_IS_PAL           =  $00000020;
  71.  DIPF_IS_SPRITES       =  $00000040;
  72.  DIPF_IS_GENLOCK       =  $00000080;
  73.  
  74.  DIPF_IS_WB            =  $00000100;
  75.  DIPF_IS_DRAGGABLE     =  $00000200;
  76.  DIPF_IS_PANELLED      =  $00000400;
  77.  DIPF_IS_BEAMSYNC      =  $00000800;
  78.  
  79.  DIPF_IS_EXTRAHALFBRITE = $00001000;
  80.  
  81. { The following DIPF_IS_... flags are new for V39 }
  82.   DIPF_IS_SPRITES_ATT           =  $00002000;      { supports attached sprites }
  83.   DIPF_IS_SPRITES_CHNG_RES      =  $00004000;      { supports variable sprite resolution }
  84.   DIPF_IS_SPRITES_BORDER        =  $00008000;      { sprite can be displayed in the border }
  85.   DIPF_IS_SCANDBL               =  $00020000;      { scan doubled }
  86.   DIPF_IS_SPRITES_CHNG_BASE     =  $00040000;
  87.                                                    { can change the sprite base colour }
  88.   DIPF_IS_SPRITES_CHNG_PRI      =  $00080000;
  89.                                                                                         { can change the sprite priority
  90.                                                                                         ** with respect to the playfield(s).
  91.                                                                                         }
  92.   DIPF_IS_DBUFFER       =  $00100000;      { can support double buffering }
  93.   DIPF_IS_PROGBEAM      =  $00200000;      { is a programmed beam-sync mode }
  94.   DIPF_IS_FOREIGN       =  $80000000;      { this mode is not native to the Amiga }
  95.  
  96. Type
  97.  DimensionInfo = Record
  98.   Header : QueryHeader;
  99.   MaxDepth,             { log2( max number of colors ) }
  100.   MinRasterWidth,       { minimum width in pixels      }
  101.   MinRasterHeight,      { minimum height in pixels     }
  102.   MaxRasterWidth,       { maximum width in pixels      }
  103.   MaxRasterHeight : Short;      { maximum height in pixels     }
  104.   Nominal,              { "standard" dimensions        }
  105.   MaxOScan,             { fixed, hardware dependant    }
  106.   VideoOScan,           { fixed, hardware dependant    }
  107.   TxtOScan,             { editable via preferences     }
  108.   StdOScan  : Rectangle; { editable via preferences     }
  109.   pad  : Array[0..13] of Byte;
  110.   reserved : Array[0..1] of Integer;          { terminator }
  111.  END;
  112.  DimensionInfoPtr = ^DimensionInfo;
  113.  
  114.  MonitorInfo = Record
  115.   Header : QueryHeader;
  116.   Mspc   : MonitorSpecPtr;         { pointer to monitor specification  }
  117.   ViewPosition,                    { editable via preferences          }
  118.   ViewResolution : Point;          { standard monitor ticks-per-pixel  }
  119.   ViewPositionRange : Rectangle;   { fixed, hardware dependant }
  120.   TotalRows,                       { display height in scanlines       }
  121.   TotalColorClocks,                { scanline width in 280 ns units    }
  122.   MinRow,                          { absolute minimum active scanline  }
  123.   Compatibility : Short;           { how this coexists with others     }
  124.   pad : Array[0..35] of Byte;
  125.   reserved : Array[0..1] of Integer;          { terminator }
  126.  END;
  127.  MonitorInfoPtr = ^MonitorInfo;
  128.  
  129. { monitor compatibility }
  130.  
  131. CONST
  132.  MCOMPAT_MIXED =  0;       { can share display with other MCOMPAT_MIXED }
  133.  MCOMPAT_SELF  =  1;       { can share only within same monitor }
  134.  MCOMPAT_NOBODY= -1;       { only one viewport at a time }
  135.  
  136.  DISPLAYNAMELEN = 32;
  137.  
  138. Type
  139.  NameInfo = Record
  140.   Header : QueryHeader;
  141.   Name   : Array[0..DISPLAYNAMELEN-1] of Char;
  142.   reserved : Array[0..1] of Integer;          { terminator }
  143.  END;
  144.  NameInfoPtr = ^NameInfo;
  145.  
  146.  
  147. {****************************************************************************}
  148.  
  149. { The following VecInfo structure is PRIVATE, for our use only
  150.  * Touch these, and burn! (V39)
  151.  }
  152. Type
  153.  VecInfo = Record
  154.         Header  : QueryHeader;
  155.         Vec     : Address;
  156.         Data    : Address;
  157.         vi_Type : WORD;               { Type in C Includes }
  158.         pad     : Array[0..2] of WORD;
  159.         reserved : Array[0..1] of Integer;
  160.  end;
  161.  
  162.  
  163. FUNCTION FindDisplayInfo(ID : Integer) : DisplayInfoHandle;
  164.     External;
  165.  
  166. FUNCTION GetDisplayInfoData(handle : DisplayInfoHandle; Buf : Address; Size, tagID, ID : Integer) : Integer;
  167.     External;
  168.  
  169. FUNCTION GetVPModeID(VP : ViewPortPtr) : Integer;
  170.     External;
  171.  
  172. FUNCTION ModeNotAvailable(ModeID : Integer) : Integer;
  173.     External;
  174.  
  175. FUNCTION NextDisplayInfo(LastID : Integer) : Integer;
  176.     External;
  177.  
  178.